
class CustomImage(gr.Image):
                    def preprocess(self, x):
                        result = super().preprocess(x)
                        if isinstance(result, dict):
                            data = result.get('data', {})
                            if isinstance(data, dict):
                                data['selected'] = True
                                result['data'] = data
                        return result
    from typing import Callable, Literal, Sequence, Any, TYPE_CHECKING
    from gradio.blocks import Block
    if TYPE_CHECKING:
        from gradio.components import Timer
        from gradio.components.base import Component

    